package com.bdzl.api.impl;

import com.bdzl.api.LoginCheckApi;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

@Component
public class LoginCheckApiFallback implements LoginCheckApi {

	final Map<String, Object> result = new HashMap<String, Object>() {
		private static final long serialVersionUID = 1L;
		{
			put("respCode", 500);
			put("success", false);
			put("msg", "auth服务不可用");
		}
	};

	@Override
	public Object checkLogin() {
		return "auth服务不可用";
	}

	@Override
	public Object getPermission(String module, String userEntity) {
		return "auth服务不可用";
	}

	@Override
	public Object getUserInfo() {
		return "auth服务不可用";
	}

	@Override
	public Object checkPermission(String cookie, String checkUrl) {
		return result;
	}


}
